package com.ysy.logistics.entities.sale.dto;

import com.ysy.logistics.entities.sale.CusOrder;
import com.ysy.logistics.entities.sale.CusOrderGoods;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.List;

/**
 * @ClassDescription:
 * @Author:姚斯羽
 * @Create:2025/4/10 15:53
 **/
@Data
@Accessors(chain = true)
public class CusOrderDto extends CusOrder {

    private List<CusOrderGoods> goodsList;

    public CusOrder toCusOrder() {
        CusOrder cusOrder = new CusOrder();
        cusOrder.setId(this.getId())
                .setOrderNum(this.getOrderNum())
                .setCustomerId(this.getCustomerId())
                .setCustomerName(this.getCustomerName())
                .setTotalPrice(this.getTotalPrice())
                .setOrderStatus(this.getOrderStatus())
                .setStorageStatus(this.getStorageStatus())
                .setStorageTime(this.getStorageTime())
                .setExpressId(this.getExpressId())
                .setRemark(this.getRemark())
                .setCreateUser(this.getCreateUser());
        cusOrder.setStatus(this.getStatus());
        cusOrder.setVersion(this.getVersion());
        cusOrder.setDeleted(this.getDeleted());
        cusOrder.setCreateTime(this.getCreateTime());
        return cusOrder;


    }
}
